<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
{{assign var="title" value=$title|default:'分类'}}
{{assign var="app" value='cat'}}
{{assign var="act" value=''}}
{{assign var="table" value='category'}}
{{assign var="td" value='9'}}
<title>{{$title}}管理 - {{'admin|admin_site_name'|C|default:'后台管理'}}</title>
{{include file="include/base.html"}}
{{include file="{{$smarty.const.PLUG}}chosen/chosen.html"}}
{{include file="{{$smarty.const.PLUG}}drag/drag.html"}}
</head>
<body>

	{{include file="include/sidebar.html"}}
	<div class="body_right">
	<div id="content">
		<!-- <div class="search">
			<form action="index.php?app={{$app}}&act={{$act}}" name="search" class="router" method="get">
				<ul class="bread">
					<li></li>
					<li>{{$title}}名:</li>
					<li><input type="text" name="title" maxlength="50" class="input-small" value="{{$smarty.get.title}}">　</li>
					<li>
						<select name="level" class="chosen">
							{{html_options options=$level selected=$smarty.get.level}}
						</select>
					</li>
					<li>
						<button type="submit" class="search btn btn-success"><i class="icon-search"></i>搜索</button>
						<a href="index.php?app={{$app}}{{if $smarty.get.menuid}}&menuid={{$smarty.get.menuid}}{{/if}}{{if $smarty.get.cat_id}}&cat_id={{$smarty.get.cat_id}}{{/if}}{{if $smarty.get.item}}&item={{$smarty.get.item}}{{/if}}{{if $smarty.get.url}}&url={{$smarty.get.url}}{{/if}}{{if $smarty.get.system}}&system={{$smarty.get.system}}{{/if}}{{if $smarty.get.iframe}}&iframe={{$smarty.get.iframe}}{{/if}}" class="a">清除</a>
					</li>
				</ul>
			</form>
		</div> -->
			
		<!--循环内容 S-->
		<form action="index.php?app={{$app}}" name="form" class="ajaxSubmit" method="post">
		<input type="hidden" name="app" value="{{$app}}"/>
		<input type="hidden" name="act" value=""/>
		<input type="hidden" name="table" value="{{$table}}"/>
		<input type="hidden" name="URL" value="{{$smarty.const.URL}}"/>
		<table class="table table-bordered drags saveorder" date="{{'table=category&field=ordering'|encode}}">
			<tbody>
			<tr class="thead">
				<td colspan="{{$td}}">
					<div class="floatr">
						<button class="mydelete btn btn-danger" _app="category" _act="delete_category" type="button"><i class="icon-trash icon-white"></i>删除数据</button>
					</div>
					◆ {{$title}}管理 －＞ {{$title}}列表
				</td>
			</tr>
			{{if !$result}}{{*是否有显示结果 S*}}
			<tr class="noline"><td colspan="{{$td}}" class="result_empty"></td></tr>
			{{else}}
			<tr class="ttitle">
				<td width="35px">ID</td>
				<td width="30px"><label><input type="checkbox" class="check_all"></label></td>
				<td width="22%">{{$title}}名</td>
				<td width="100px">唯一名称</td>
				<td width="">描述</td>
				<td width="30px">热门</td>
				<td width="49px">排序 <img title="保存排序" class="save_order" style="width:20px;height:20px;cursor:pointer;" src="{{$smarty.const.__APP__}}images/system/save.png"/> </td>
				<td width="27px">发布</td>
				<td width="150px" class="textac">操作</td>
			</tr>
			{{foreach from=$result item=val}}
			<tr class="{{if $val.parent_id!=0}}drag{{/if}}">
				{{*ID*}}<td> {{$val.id}} <input type="hidden" name="ids[]" value="{{$val.id}}" /></td>
				{{*选择*}}<td><label><input type="checkbox" class='check_id' name="check_id[]" value="{{$val.id}}"/></label></td>
				{{*分类名*}}<td align="left">
								<span style="margin-left:{{$val.level*12}}px;">&nbsp;</span>
								{{if $val.level>0}}|--{{/if}}
								{{$val.title}}
								{{if in_array($val.id,'form_model'|C)}}
								  	<a target="_blank" class="label label-warning" href="index.php?app=form&cat_id={{$val.id}}">form</a>
								{{/if}}
							</td>
				{{*唯一名称*}}<td align="left">{{$val.item}}</td>
				{{*描述*}}<td align="left">{{$val.description}}</td>
				{{*热门*}}<td align="left">{{if $val.hot==1}}<img src="{{$smarty.const.__APP__}}images/system/hot.gif"/>{{/if}}</td>
				{{*排序*}}<td><input class="is_number" maxlength="4" type='text' name="order[]" style="width:25px;" value='{{$val.ordering}}'/></td>
				{{*发布*}}<td> {{if $val.level>0}}<a class="ajaxSubmit refresh" link="index.php?app=functions&act=setValue&value={{!$val.publish}}&params={{'table='|cat:$table|cat:'&field=publish&id='|cat:$val.id|encode}}"><span class="select_{{$val.publish}}"></span></a>{{/if}} </td>
				<td>
					<!--一级分类->编辑-->
					{{if $val.level==1}}
						{{*编辑*}}<span style="margin-left:{{$val.level*10}}px;">&nbsp;</span><a height="400" class='btn iframe' href="index.php?app={{$app}}&act=modify&item={{$smarty.get.item}}&parent_id={{$val.parent_id}}&id={{$val.id}}&tpl=modify&iframe=true" title="{{$val.title}}－编辑"><i class="icon-edit"></i>{{if $val.parent_id==0}}编辑{{/if}}</a>
					{{/if}}
					<!--顶级分类->添加一级分类-->
					{{if $val.level==0}}
						{{*添加*}}<a height="400" class='btn iframe' href="index.php?app={{$app}}&act=modify&item={{$smarty.get.item}}&parent_id={{$val.id}}&tpl=modify&iframe=true" title="{{$val.title}}－添加子分类"><i class="icon-plus-sign"></i>{{if $val.parent_id==0}}添加{{/if}}</a>
					{{/if}}
				</td>
			</tr>
			{{/foreach}}

			<tr class="noline ttitle">
				<td colspan="{{$td}}">
				<a class="check_all btn"><i class="icon-ok"></i>全选/反选</a>
				</td>
			</tr>
			{{/if}}{{*是否有显示结果 E*}}
			<tr class="thead">
				<td colspan="{{$td}}">
					{{include file="include/page.html"}}
				</td>
			</tr>
			</tbody>
		 </table>
		</form>
		<!--循环内容 E-->
</div>
</div>

</body>
</html>